package book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2024-07-14
 * Time: 14:10
 */
public class BookList {
    private Book[] books = new Book[10];
    private int useSized = 0;

    public BookList(){
        this.books[0] = new Book("三国演义","罗贯中",15,"小说");
        this.books[1] = new Book("西游记","吴承恩",14,"小说");
        this.books[2] = new Book("红楼梦","曹雪芹",15,"小说");

        this.useSized = 3;
    }

    public int getUseSized() {
        return useSized;
    }

    public void setUseSized(int useSized) {
        this.useSized = useSized;
    }

    public Book getBook(int pos) {
        return books[pos];
    }

    public void setBook(int pos,Book book) {
        this.books[pos] = book;
    }

    public Book[] getBooks(){
        return books;
    }
}
